package com.shenjies88.practice.designpatterns;

import com.shenjies88.practice.designpatterns.decorator.EggDecorator;
import com.shenjies88.practice.designpatterns.decorator.SausageDecorator;

public class ClientTest {

    public static void main(String[] args) {
        Battercake battercake = new Battercake();
        System.out.println(battercake.getDesc() + ", 销售价格: " + battercake.cost());
        battercake = new EggDecorator(battercake);
        System.out.println(battercake.getDesc() + ", 销售价格: " + battercake.cost());
        battercake = new EggDecorator(battercake);
        System.out.println(battercake.getDesc() + ", 销售价格: " + battercake.cost());
        battercake = new SausageDecorator(battercake);
        System.out.println(battercake.getDesc() + ", 销售价格: " + battercake.cost());
    }
}
